#https://www.jianshu.com/p/599550afd28d
#本文主要分析cmake中4个变量的区别：

#CMAKE_ARCHIVE_OUTPUT_DIRECTORY：默认存放静态库的文件夹位置；
#CMAKE_LIBRARY_OUTPUT_DIRECTORY：默认存放动态库的文件夹位置；
#LIBRARY_OUTPUT_PATH：默认存放库文件的位置，如果产生的是静态库并且没有指定 CMAKE_ARCHIVE_OUTPUT_DIRECTORY 则存放在该目录下，动态库也类似；
#CMAKE_RUNTIME_OUTPUT_DIRECTORY：存放可执行软件的目录；

set(CMAKE_INCLUDE_CURRENT_DIR ON)

message( ${CMAKE_CURRENT_SOURCE_DIR}"/123" )
set( preference_include ${CMAKE_CURRENT_SOURCE_DIR}/../libpreference/ )
message( ${preference_include} )

set( rapidsvn_include ${CMAKE_CURRENT_SOURCE_DIR}/../librapidsvn/include )
message( ${rapidsvn_include} )

set( svncpp_include ${CMAKE_CURRENT_SOURCE_DIR}/../libsvncpp/include )
message( ${svncpp_include} )

add_definitions("-D WXUSINGDLL")
add_definitions("-D __WXGTK__")
add_definitions("-D _DEBUG_" )

#g++ test_svn.cpp -I/usr/include/subversion-1/ -I/usr/include/apr-1.0/  -L/usr/local/lib -lsvncpp
#file(GLOB SOURCE_FILES rapidsvn_app.cpp)

#add_executable( example ${SOURCE_FILES})

#add_executable(RapidSVN_cmake rapidsvn.cpp)
#include_directories(${KIUI_SOURCE_DIR}/src)
#target_include_directories(example PUBLIC
#        "/usr/include/wx-3.0/"
#        "/usr/lib/x86_64-linux-gnu/wx/include/gtk3-unicode-3.0/"
#        "/usr/include/apr-1.0/"
#        ${rapidsvn_include}
#        ${svncpp_include}
#        ${preference_include}
#        )

#-lsvn_fs -laprutil-1 -lldap -llber -lapr-1
#-lsvn_client -laprutil-1 -lldap -llber -lapr-1
#SVN_LIBS = -L/usr/lib/x86_64-linux-gnu -lsvn_client-1 -lsvn_wc-1 -lsvn_ra-1 -lsvn_delta-1 -lsvn_subr-1
#WX_LIBS = -L/usr/lib/x86_64-linux-gnu -pthread   -lwx_baseu-3.0 -lwx_gtk2u_core-3.0 -lwx_gtk2u_adv-3.0
#APR_LIBS =  -L/usr/lib/x86_64-linux-gnu -lapr-1   -L/usr/lib/x86_64-linux-gnu -laprutil-1
#target_link_libraries(example rapidsvn svncpp svn_client-1 svn_wc-1 svn_ra-1 svn_delta-1 svn_subr-1
#            aprutil-1 ldap lber apr-1 preference -ljsoncpp -lcurl )
#??
#LINK_DIRECTORIES("/usr/local/lib/" {CMAKE_CURRENT_SOURCE_DIR}"/../libpreference" )

#MainApp
message( "build confApp" )
#
#file(GLOB SOURCE_FILES src/MainApp.cpp.cpp)
#aux_source_directory(../MainApp/src SOURCE_FILES )

add_executable( console src/MainApp.cpp )

target_include_directories( console PUBLIC
        "/usr/include/wx-3.0/"
        "/usr/lib/x86_64-linux-gnu/wx/include/gtk3-unicode-3.0/"
        "/usr/include/apr-1.0/"
        "/usr/local/include"
        )
#
target_link_libraries( console rapidsvn svncpp svn_client-1 svn_wc-1 svn_ra-1 svn_delta-1 svn_subr-1
        aprutil-1 ldap lber apr-1 preference -ljsoncpp -lcurl -lssh2
        )

#LINK_DIRECTORIES("/usr/local/lib/" {CMAKE_CURRENT_SOURCE_DIR}"/../libpreference" )
